/****************************************************************************

	COPYRIGHT(C) MAXSI SOFTWARE, JONAS 'SORTIE' TERMANSEN 2008, 2009, 2010

    This file is part of Maxsi Engine.

    Maxsi Engine is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Maxsi Engine is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Maxsi Engine. If not, see <http://www.gnu.org/licenses/>.

	*/ #include "MaxsiEngineContributors.h" /*

	If you modify this file, please enter your name below and provide contact
	information in MaxsiEngineContributors.h. For more information please see
	MaxsiEngineContributors.h.
	
	Contributors to this file:

	- Jonas 'Sortie' Termansen
	- [your name here]

	MaxsiEngine.dll
	A linkable version of Maxsi Engine

	MaxsiUI_Controls.h
	Functions for easily creating common controls

****************************************************************************/

#ifndef MaxsiUI_Controls_H
#define MaxsiUI_Controls_H

namespace MaxsiEngine
{

	LINK bool	InitializeMaxsiUI_Controls(HANDLE hInstance);

	LINK HWND CreateLabelW(HWND hwnd, LPCWSTR Text, int X, int Y, int W, int H);
	LINK HWND CreateLabelA(HWND hwnd, LPCSTR Text, int X, int Y, int W, int H);

	#ifdef ME_USE_MULTIBYTE_STRING
	#define CreateLabel  CreateLabelW
	#else
	#define CreateLabel  CreateLabelA
	#endif // !ME_USE_MULTIBYTE_STRING

	LINK HWND CreateLabelAEx(HWND hwnd, LPCSTR Text, int X, int Y, int W, int H, HFONT hFont);

	LINK HWND CreateButtonA(HWND hwnd, LPCSTR Text, int X, int Y, int W, int H);
	LINK HWND CreateButtonW(HWND hwnd, LPCWSTR Text, int X, int Y, int W, int H);
	#ifdef ME_USE_MULTIBYTE_STRING
	#define CreateButton  CreateButtonW
	#else
	#define CreateButton  CreateButtonA
	#endif // !ME_USE_MULTIBYTE_STRING

	LINK HWND CreateTextA(HWND hwnd, LPCSTR Text, int X, int Y, int W, int H);
	LINK HWND CreateTextW(HWND hwnd, LPCWSTR Text, int X, int Y, int W, int H);
	LINK HWND CreateTextExA(HWND hwnd, LPCSTR Text, int X, int Y, int W, int H, DWORD Style);
	LINK HWND CreateTextExW(HWND hwnd, LPCWSTR Text, int X, int Y, int W, int H, DWORD Style);
	LINK char*		GetTextAText(HWND hwnd);
	LINK wchar_t*	GetTextWText(HWND hwnd);

	#ifdef ME_USE_MULTIBYTE_STRING
	#define CreateText  CreateTextW
	#define CreateTextEx  CreateTextExW
	#define GetTextText  GetTextWText
	#define SetWindowTextM(HWND,Text) SetWindowTextW(HWND,Text)
	#else
	#define CreateText  CreateTextA
	#define CreateTextEx  CreateTextExA
	#define CreateTextEx  CreateTextExA
	#define GetTextText  GetTextAText
	#define SetWindowTextM(HWND,Text) SetWindowTextA(HWND,Text)
	#endif // !ME_USE_MULTIBYTE_STRING

	LINK HWND CreateRadioButtonA(HWND hwnd, LPCSTR Text, int X, int Y, int W, int H, bool Selected);
	LINK HWND CreateRadioButtonW(HWND hwnd, LPCWSTR Text, int X, int Y, int W, int H, bool Selected);
	#ifdef ME_USE_MULTIBYTE_STRING
	#define CreateButtonRadio  CreateButtonRadioW
	#else
	#define CreateButtonRadio  CreateButtonRadioA
	#endif // !ME_USE_MULTIBYTE_STRING

	LINK HWND CreateCheckButtonA(HWND hwnd, LPCSTR Text, int X, int Y, int W, int H, bool Selected);
	LINK HWND CreateCheckButtonW(HWND hwnd, LPCWSTR Text, int X, int Y, int W, int H, bool Selected);
	#ifdef ME_USE_MULTIBYTE_STRING
	#define CreateCheckRadio  CreateCheckButtonW
	#else
	#define CreateCheckRadio  CreateCheckButtonA
	#endif // !ME_USE_MULTIBYTE_STRING

	LINK HWND CreateProgressBarA(HWND hwnd, LPCSTR Text, int X, int Y, int W, int H);
	LINK HWND CreateProgressBarW(HWND hwnd, LPCWSTR Text, int X, int Y, int W, int H);
	#ifdef ME_USE_MULTIBYTE_STRING
	#define CreateProgressBar  CreateProgressBarW
	#else
	#define CreateProgressBar  CreateProgressBarA
	#endif // !ME_USE_MULTIBYTE_STRING

	LINK HWND CreateTreeViewA(HWND hwnd, char* Unused, int X, int Y, int W, int H);
	LINK HWND CreateTreeViewW(HWND hwnd, char* Unused, int X, int Y, int W, int H);
	#ifdef ME_USE_MULTIBYTE_STRING
	#define CreateTreeView  CreateTreeViewW
	#else
	#define CreateTreeView  CreateTreeViewA
	#endif // !ME_USE_MULTIBYTE_STRING

	LINK HTREEITEM AddItemToTreeViewA(HWND hwndTV, LPCSTR lpszItem, int nLevel);
	LINK HTREEITEM AddItemToTreeViewW(HWND hwndTV, LPCWSTR lpszItem, int nLevel);
	#ifdef ME_USE_MULTIBYTE_STRING
	#define AddItemToTreeView AddItemToTreeViewW
	#define TVITEMM TVITEMW
	#define TVINSERTSTRUCTM TVINSERTSTRUCTW
	#else
	#define AddItemToTreeView AddItemToTreeViewA
	#define TVITEMM TVITEMA
	#define TVINSERTSTRUCTM TVINSERTSTRUCTA
	#endif // !ME_USE_MULTIBYTE_STRING

	LINK HWND CreateListViewM(HWND hwnd);
	LINK BOOL AddListViewColumn(HWND List, int Id, MESTR* Name, int Width);

	#ifdef ME_USE_MULTIBYTE_STRING
	#define WC_LISTVIEWM WC_LISTVIEWW
	#define LVCOLUMNM LVCOLUMNW
	#define NMLVDISPINFOM NMLVDISPINFOW
	#else
	#define WC_LISTVIEWM WC_LISTVIEWA
	#define LVCOLUMNM LVCOLUMNA
	#define NMLVDISPINFOM NMLVDISPINFOA
	#endif

}

#endif